Complete plaintext local sandbox integration support - #710
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe integration harness now supports local compatibility sandboxes with restricted plaintext REST and Realtime routing. Tests can use configurable local endpoints, JWT creation, and stats fixtures. Transport recording now supports arbitrary round-trippers and nil responses. ChangesLocal sandbox routing
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This test-only change adds opt-in local sandbox routing without any identified merge-blocking risk; it is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant IntegrationTests
participant Sandbox
participant RESTTransport
participant RealtimeDialer
IntegrationTests->>Sandbox: provision local child
Sandbox->>RESTTransport: configure approved REST routing
IntegrationTests->>RealtimeDialer: install URL transform
RESTTransport->>Sandbox: send rewritten HTTP request
RealtimeDialer->>Sandbox: dial rewritten plaintext WebSocket
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Builds on #708 by completing support for compatibility servers that provision a plaintext loopback child.
The routing is enabled only with ABLY_LOCAL_PLAINTEXT_REALTIME=1. Cloud sandbox behavior and the direct ABLY_LOCAL_SANDBOX_URL mode remain available. No production SDK files or test assertions are changed.
Why
Directly replacing the logical endpoint with a local HTTP/WS address lets basic integration tests run, but changes the semantics of TLS and fallback tests. A few fixtures also continue to call public Ably services. This test-only routing keeps those test semantics intact while making the suite hermetic for a local compatibility server.
Verification
Summary by CodeRabbit
Documentation
Tests